* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    padding: 30px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
}

.main-header {
    text-align: center;
    margin-bottom: 30px;
    position: relative;
}

.main-header h1 {
    font-size: 36px;
    color: #333;
    margin-bottom: 10px;
}

.main-header p {
    color: #666;
    font-size: 16px;
}

.post-btn {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 10px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
}

.post-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.user-info {
    position: absolute;
    top: 20px;
    left: 20px;
    display: flex;
    gap: 15px;
    align-items: center;
}

.auth-buttons {
    position: absolute;
    top: 20px;
    left: 20px;
    display: flex;
    gap: 10px;
}

.auth-btn {
    padding: 8px 16px;
    background: #667eea;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s;
}

.auth-btn:hover {
    background: #5568d3;
}

.logout-btn {
    padding: 6px 12px;
    background: #999;
    color: white;
    text-decoration: none;
    border-radius: 6px;
    font-size: 14px;
}

.logout-btn:hover {
    background: #777;
}

.login-prompt {
    background: #fff3cd;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    text-align: center;
    color: #856404;
}

.login-prompt a {
    color: #667eea;
    text-decoration: none;
    font-weight: bold;
}

.login-prompt a:hover {
    text-decoration: underline;
}

.success-message {
    background: #d4edda;
    color: #155724;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    margin-bottom: 20px;
}

.post-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 30px;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.post-section h2 {
    font-size: 20px;
    color: #333;
    margin-bottom: 15px;
}

#contentInput {
    width: 100%;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 15px;
    font-size: 16px;
    resize: vertical;
    margin-bottom: 10px;
    transition: border-color 0.3s;
}

#contentInput:focus {
    outline: none;
    border-color: #667eea;
}

.emoji-panel {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    padding: 10px;
    background: white;
    border-radius: 10px;
}

.emoji {
    font-size: 24px;
    cursor: pointer;
    padding: 5px;
    border-radius: 5px;
    transition: background 0.2s;
}

.emoji:hover {
    background: #f0f0f0;
}

.button-group {
    display: flex;
    gap: 10px;
}

button {
    padding: 12px 24px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s;
}

.emoji-btn {
    background: #e0e0e0;
    color: #333;
}

.emoji-btn:hover {
    background: #d0d0d0;
}

.submit-btn {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    flex: 1;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.cancel-btn {
    background: #999;
    color: white;
}

.cancel-btn:hover {
    background: #777;
}

.shuoshuos-section h2 {
    font-size: 20px;
    color: #333;
    margin-bottom: 20px;
}

.shuoshuo-item {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 15px;
    border-left: 4px solid #667eea;
}

.shuoshuo-item.violation {
    background: #fff3cd;
    border-left-color: #ffc107;
}

.shuoshuo-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.author {
    font-weight: bold;
    color: #667eea;
}

.shuoshuo-time {
    font-size: 12px;
    color: #999;
}

.delete-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 4px 12px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 12px;
}

.delete-btn:hover {
    background: #c82333;
}

.shuoshuo-content {
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    margin-bottom: 10px;
    word-wrap: break-word;
}

.comment-section {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e0e0e0;
}

.toggle-comment-btn {
    padding: 8px 16px;
    background: #f0f0f0;
    color: #666;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.toggle-comment-btn:hover {
    background: #e0e0e0;
    border-color: #667eea;
    color: #667eea;
}

.comment-icon {
    font-size: 16px;
    margin-right: 4px;
}

.comment-input-area {
    margin-top: 10px;
    margin-bottom: 15px;
}

.comment-input {
    width: 100%;
    padding: 8px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    resize: vertical;
    margin-bottom: 8px;
}

.comment-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.comment-btn {
    padding: 8px 16px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

.comment-btn:hover {
    background: #5568d3;
}

.cancel-comment-btn {
    padding: 8px 16px;
    background: #999;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
}

.cancel-comment-btn:hover {
    background: #777;
}

.comments-container {
    margin-top: 10px;
}

.more-comments-btn {
    width: 100%;
    padding: 10px;
    background: #f0f0f0;
    color: #666;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 10px;
    font-size: 14px;
    transition: all 0.3s;
}

.more-comments-btn:hover {
    background: #e0e0e0;
    border-color: #667eea;
    color: #667eea;
}

.comments-container h4 {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

.comment-item {
    background: white;
    padding: 10px;
    border-radius: 8px;
    margin-bottom: 8px;
    border-left: 3px solid #667eea;
}

.comment-author {
    font-weight: bold;
    color: #667eea;
    font-size: 13px;
    margin-bottom: 5px;
}

.comment-content {
    color: #333;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 5px;
}

.comment-time {
    font-size: 11px;
    color: #999;
}

.comment-prompt {
    text-align: center;
    color: #999;
    font-size: 14px;
    padding: 10px;
}

.comment-prompt a {
    color: #667eea;
    text-decoration: none;
}

.comment-prompt a:hover {
    text-decoration: underline;
}

/* 分页样式 */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-top: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
}

.page-btn {
    padding: 10px 20px;
    background: #667eea;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s;
    font-size: 14px;
}

.page-btn:hover {
    background: #5568d3;
    transform: translateY(-2px);
}

.page-info {
    color: #666;
    font-size: 14px;
}

.shuoshuo-meta {
    display: flex;
    align-items: center;
    gap: 15px;
}

.status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
}

.status-normal {
    background: #d4edda;
    color: #155724;
}

.status-violation {
    background: #f8d7da;
    color: #721c24;
}

.toggle-btn {
    background: #ffc107;
    color: #333;
    padding: 6px 12px;
    font-size: 14px;
}

.toggle-btn:hover {
    background: #ffb300;
}

.empty-message {
    text-align: center;
    padding: 40px;
    color: #999;
    font-size: 18px;
}

/* 用户管理样式 */
.users-section {
    margin-top: 20px;
}

.user-item {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 15px;
    border-left: 4px solid #667eea;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.user-item.banned {
    background: #fff3cd;
    border-left-color: #ffc107;
}

.user-main-info {
    flex: 1;
}

.user-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
}

.user-header strong {
    font-size: 18px;
    color: #333;
}

.banned-badge {
    background: #dc3545;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
}

.normal-badge {
    background: #28a745;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: bold;
}

.user-details {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
}

.user-detail-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.user-detail-item .label {
    color: #666;
    font-weight: 500;
    min-width: 70px;
}

.user-detail-item .value {
    color: #333;
    font-weight: normal;
}

.user-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

.ban-btn {
    background: #ffc107;
    color: #333;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
}

.ban-btn:hover {
    background: #ffb300;
}

.delete-user-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
}

.delete-user-btn:hover {
    background: #c82333;
}


/* 登录页样式 */
.login-box {
    max-width: 400px;
    margin: 0 auto;
}

.login-box h1 {
    text-align: center;
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: bold;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    padding: 12px;
    border-radius: 10px;
    margin-bottom: 20px;
    text-align: center;
}

.links {
    text-align: center;
    margin-top: 20px;
}

.links a {
    color: #667eea;
    text-decoration: none;
}

/* 管理后台头部 */
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e0e0e0;
}

.admin-header h1 {
    margin: 0;
}

.admin-actions {
    display: flex;
    gap: 15px;
}

.btn-link {
    padding: 10px 20px;
    background: #667eea;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s;
}

.btn-link:hover {
    background: #5568d3;
    transform: translateY(-2px);
}

@media (max-width: 768px) {
    .container {
        padding: 20px;
    }

    .main-header h1 {
        font-size: 28px;
    }

    .post-btn {
        position: static;
        margin-top: 15px;
        width: 100%;
    }

    .user-info, .auth-buttons {
        position: static;
        margin: 15px 0;
        justify-content: center;
    }

    .admin-header {
        flex-direction: column;
        gap: 15px;
    }

    .admin-actions {
        width: 100%;
        justify-content: center;
    }
}

